<template>
  <div class="app">
    <Game>
      <template scope="atguigu">
        <ul>
          <li v-for="game in atguigu.games" :key="game.id">
            {{game.name}}
          </li>
        </ul>
      </template>
    </Game>

    <Game>
      <!-- <template scope="{games}"> -->
      <!-- <template slot-scope="{games}"> -->
      <!-- <template v-slot="{games}"> -->
      <template v-slot:default="{games}">
        <ol>
          <li v-for="game in games" :key="game.id">
            {{game.name}}
          </li>
        </ol>
      </template>
    </Game>

    <Game>
      <template scope="atguigu">
          <h3 v-for="game in atguigu.games" :key="game.id">
            {{game.name}}
          </h3>
      </template>
    </Game>
  </div>
</template>

<script>
  import Game from './components/Game.vue'

  export default {
    name:'App',
    components:{Game},
  }
</script>

<style>
  .app {
    background-color: #ddd;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px;
    display: flex;
    justify-content: space-evenly;
  }
</style>